package net.zjitc.Student;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Student[] students=new Student[4]; //利用数组
        students[0]=new CollegeStudent("张三");
        students[0]=new CollegeStudent("李四");
        students[0]=new Undergraduate("lily");
        students[0]=new Undergraduate("lucy");

        float[] score={87,90,78}; //调用成绩，给成绩赋值
        for (int i =0;i<students.length;i++){ //利用for循环，判断等级
            students[i].setCourses(score);
            students[i].calculateGrade();
        }
        System.out.println("姓名\t 类型\t  等级");
        for (int i=0;i<students.length;i++){
            System.out.println(students[i].getName()+
            students[i].getType()+"\t"+students+students[i].getCourseGrade());
        }
    }
}
